package com.bw.lyc.thread;

import android.os.Handler;
import android.os.Message;

import com.bw.lyc.handler.TimerHandler;
import com.bw.lyc.util.LogUtils;

public class TimerThread extends Thread{

    private TimerHandler handler;

    public TimerThread(TimerHandler handler){
        this.handler = handler;
    }

    @Override
    public void run() {
        super.run();
        LogUtils.e("TimerThread->run");
        try {
            Thread.sleep(1500);
            LogUtils.e("TimerThread->run 1500");
        } catch (InterruptedException e) {
            e.printStackTrace();
            LogUtils.e("TimerThread->run erro:"+e.getMessage());
        }
        Message msg = handler.obtainMessage();
        handler.sendMessage(msg);
    }
}
